<template>
  <h1>父组件的内容</h1>
  <child :name="fatherName"/>
</template>
<script setup lang="ts" name="ts">
import {type PersonInter,type Persons} from '@/types'
import {reactive} from 'vue'
// 引入子组件
import child from './child.vue'

let person: PersonInter = {
  id:'1',
  name: '张三',
  age: 18,
}
// 定义一个响应式的接口 泛型的写法
let  personList = reactive<Persons> ( [
  {
    id:'1',
    name: '张三',
    age: 18,
  },
  {
    id:'2',
    name: '李四',
    age: 19,
  },
  {
    id:'3',
    name: '王五',
    age: 20,
  },
])
let  fatherName ='我是父组件'
console.log(personList)
</script>
<style lang="scss" scoped></style>
